package cn.heima.com;


import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateDemo2 {
    public static void main(String[] args) throws ParseException {
        String s = "1997-01-08";
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
        Date parse = sdf.parse(s);
        Date date = new Date();
        long date1 = date.getTime()-parse.getTime();

        long date3 = date1/1000/3600/24;

        System.out.println(date3);

    }
}
